<!DOCTYPE html >
<html>
<head>
<meta name="Generator" content="TPshop v1.1" />
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>首页-{$tpshop_config['shop_info_store_title']}</title>
<meta http-equiv="keywords" content="{$tpshop_config['shop_info_store_keyword']}" />
<meta name="description" content="{$tpshop_config['shop_info_store_desc']}" />
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<link rel="stylesheet" type="text/css" href="__STATIC__/css/public.css"/>
<link rel="stylesheet" type="text/css" href="__STATIC__/css/index.css"/>
<script type="text/javascript" src="__STATIC__/js/jquery.js"></script>
<script type="text/javascript" src="__STATIC__/js/TouchSlide.1.1.js"></script>
<script type="text/javascript" src="__STATIC__/js/jquery.json.js"></script>
<script type="text/javascript" src="__STATIC__/js/touchslider.dev.js"></script>
<script type="text/javascript" src="__STATIC__/js/layer.js" ></script>
<script src="__PUBLIC__/js/global.js"></script>
<script src="__PUBLIC__/js/mobile_common.js"></script>
<!-- IE8及以下支持JSON -->
<!--[if lt IE 9]>
    <script src="https://g.alicdn.com/aliww/ww/json/json.js" charset="utf-8"></script>
<![endif]-->
<!-- WSDK-->
<script src="https://g.alicdn.com/aliww/h5.openim.sdk/1.0.6/scripts/wsdk.js"></script>
<style>
body{
  line-height: 100%
}
.entry-list a span {
  line-height: 12px;
  font-size:12px;
}
.index_floor{
  margin-top:2px;
}
.entry-list a img {
    display: block;
    width: 45%;
    margin: auto;
}
.index_search_mid input{
  margin-top:10px;
}
.sg_g_time{
  font-size:12px;
  color:#999;
  line-height: 0px;
  margin-top:-10px;
}
.scroll_hot .bd ul li .goods_name{
  height:auto;
}
</style>
</head>
<body>
<div id="page" class="showpage">
<div>
<header id="header"> 
<a href="{:U('Goods/categoryList')}" class="top_bt"></a><a href="{:U('Cart/cart')}" class='user_btn'></a>
<span href="javascript:void(0)" class="logo">{$tpshop_config['shop_info_store_name']}</span> 
</header>

<div id="scrollimg" class="scrollimg">
  <div class="bd">
	 <ul>
	 	<adv pid ="2" limit="5" item="v">
	    	<li><a href="{$v.ad_link}" <if condition="$v['target'] eq 1">target="_blank"</if> ><img src="{$v[ad_code]}" title="{$v[title]}"  width="100%" style="{$v[style]}"/></a></li>
     	</adv>      
     </ul>
  </div>
  <div class="hd">
	<ul></ul>
  </div>
</div>
<script type="text/javascript">
	TouchSlide({ 
		slideCell:"#scrollimg",
		titCell:".hd ul", //开启自动分页 autoPage:true ，此时设置 titCell 为导航元素包裹层
		mainCell:".bd ul", 
		effect:"leftLoop", 
		autoPage:true,//自动分页
		autoPlay:true //自动播放
	});
</script> 
<script >
var Tday = new Array();
var daysms = 24 * 60 * 60 * 1000
var hoursms = 60 * 60 * 1000
var Secondms = 60 * 1000
var microsecond = 1000
var DifferHour = -1
var DifferMinute = -1
var DifferSecond = -1

function clock11(key)
{
   var time = new Date()
   var hour = time.getHours()
   var minute = time.getMinutes()
   var second = time.getSeconds()
   var timevalue = ""+((hour > 12) ? hour-12:hour)
   timevalue +=((minute < 10) ? ":0":":")+minute
   timevalue +=((second < 10) ? ":0":":")+second
   timevalue +=((hour >12 ) ? " PM":" AM")
   var convertHour = DifferHour
   var convertMinute = DifferMinute
   var convertSecond = DifferSecond
   var Diffms = Tday[key].getTime() - time.getTime()
   DifferHour = Math.floor(Diffms / daysms)
   Diffms -= DifferHour * daysms
   DifferMinute = Math.floor(Diffms / hoursms)
   Diffms -= DifferMinute * hoursms
   DifferSecond = Math.floor(Diffms / Secondms)
   Diffms -= DifferSecond * Secondms
   var dSecs = Math.floor(Diffms / microsecond)
  
  if(convertHour != DifferHour) e="<span class=hour>"+DifferHour+"</span>天";
   if(convertMinute != DifferMinute) f="<span class=min>"+DifferMinute+"</span>时";
   if(convertSecond != DifferSecond) g="<span class=sec>"+DifferSecond+"</span>分";
     h="<span class=msec>"+dSecs+"</span>秒";
     if (DifferHour>0) {e=e}
     else {e=''}
     //document.getElementById("jstimerBox"+key).innerHTML = e + f + g + h; 
     return (e + f + g + h);
}

</script>
<div id="fake-search" class="index_search">
  <div class="index_search_mid">
  <span><img src="__STATIC__/images/xin/icosousuo.png"></span>
    <input  type="text" id="search_text" class="search_text" value="请输入您所搜索的商品"/>
  </div>
</div>
<div class="entry-list clearfix">
	<nav>
		<ul>
      <li>
        <a href="{:U('Goods/search')}">
          <img alt="全部商品" src="__STATIC__/images/1440439318451279676.png" />
          <span>全部商品</span>
        </a>
      </li> 
			<li>
				<a href="{:U('Goods/shopcategory')}">
					<img alt="商品分类" src="__STATIC__/images/1440437165699930301.png" />
					<span>商品分类</span>
				</a>
			</li>		 
			
			<li>
				<a href="{:U('Cart/cart')}">
					<img alt="打卡签到" src="__STATIC__/images/1440439353048484531.png" />
					<span>打卡签到</span>
				</a>
			</li>
			<li>
				<a href="{:U('User/index')}">
					<img alt="个人中心" src="__STATIC__/images/1440439367001464442.png" />
					<span>个人中心</span>
				</a>
			</li>
		</ul>
	</nav>
</div>
 
<!-- <div class="floor_images">
	  <dl>
	    <dt>
	      <adv  limit="1" item="v" pid="300">        
            <a href="{$v.ad_link}" <if condition="$v['target'] eq 1">target="_blank"</if> >
                <img src="{$v[ad_code]}" title="{$v[title]}" style="{$v[style]}" border="0">
            </a> 
		  </adv>              
        </dt>    
        <dd> 
            <span class="Edge">
		      <adv  limit="1" item="v" pid="301">            
                <a href="{$v.ad_link}" <if condition="$v['target'] eq 1">target="_blank"</if> >
                    <img src="{$v[ad_code]}" title="{$v[title]}" style="{$v[style]}" border="0">
                </a>
               </adv>
            </span> 
            <span>
		      <adv  limit="1" item="v" pid="302">
                <a href="{$v.ad_link}" <if condition="$v['target'] eq 1">target="_blank"</if> >
                    <img src="{$v[ad_code]}" title="{$v[title]}" style="{$v[style]}" border="0">
                </a>
               </adv>           
            </span> 
        </dd>
	  </dl>
	  <ul>
	    <li class="brom">
		      <adv  limit="1" item="v" pid="303">
                <a href="{$v.ad_link}" <if condition="$v['target'] eq 1">target="_blank"</if> >
                    <img src="{$v[ad_code]}" title="{$v[title]}" style="{$v[style]}" border="0">
                </a>
               </adv>        
        </li>
	    <li>
		      <adv  limit="1" item="v" pid="304">
                <a href="{$v.ad_link}" <if condition="$v['target'] eq 1">target="_blank"</if> >
                    <img src="{$v[ad_code]}" title="{$v[title]}" style="{$v[style]}" border="0">
                </a>
               </adv>        
        </li>
	  </ul>
</div> -->
<!-- <script>
	// 倒计时
	function GetRTime2(){
		//var text = GetRTime('2016/02/27 17:34:00');
	   <tpshop sql="select * from __PREFIX__goods as g inner join __PREFIX__flash_sale as f on g.goods_id = f.goods_id limit 3" key="k" item='v'>
		var text{$v[goods_id]} = GetRTime('{$v.end_time|date="Y/m/d H:i:s",###}');
		
		if (typeof(text{$v[goods_id]}) == "undefined") 
				$("#surplus_text{$v[goods_id]}").text('活动已结束');
		else   		
				$("#surplus_text{$v[goods_id]}").text(text{$v[goods_id]});
			
	   </tpshop>
	}
	setInterval(GetRTime2,1000);
</script> -->
<!-- <section class="index_floor_lou">
	  <div class="floor_body">
	    <h2>
	      <em></em>促销商品
            <div class="geng"><a href="{:U('Goods/search',array('q'=>'促销'))}">更多</a><span></span></div>
	    </h2>
	    <div id="scroll_promotion">
	        <ul>
	         <tpshop sql="select * from __PREFIX__goods as g inner join __PREFIX__flash_sale as f on g.goods_id = f.goods_id limit 3" key="key" item='val'>
	          <li>
	            <a href="{:U('Mobile/Goods/goodsInfo',array('id'=>$v[goods_id],'u_id'=>$user))}" title="{$val.goods_name}"></a>
	            <div class="index_pro">
		            <a href="{:U('Mobile/Goods/goodsInfo',array('id'=>$val[goods_id],'u_id'=>$user))}" title="{$val.goods_name}">
		              <div class="products_kuang">
		              	<div class="timerBox" id="surplus_text{$val[goods_id]}">1时 59分 59秒</div>
		                <img src="{$val.goods_id|goods_thum_images=400,400}">
		              </div>
		              <div class="goods_name">{$val.goods_name}</div>
		            </a>
		              <div class="price">
                      <a href="javascript:AjaxAddCart({$val[goods_id]},1,0);" class="btns">
		                  <img src="__STATIC__/images/index_flow.png">
                      </a>
		                <span class="price_pro">￥{$val.price}元</span>
		              </div>
				</div>
	          </li>
	          </tpshop>
	        </ul>
	    </div>
	</div>
</section> -->
<div class="floor_images">
        <dl>
            <dt>
              <adv  limit="1" item="v" pid="305">
                <a href="{$v.ad_link}" <if condition="$v['target'] eq 1">target="_blank"</if> >
                    <img src="{$v[ad_code]}" title="{$v[title]}" style="{$v[style]}" border="0">
                </a>
               </adv>        
            </dt>
            <dd> 
            <span class="Edge">
              <adv  limit="1" item="v" pid="306">
                <a href="{$v.ad_link}" <if condition="$v['target'] eq 1">target="_blank"</if> >
                    <img src="{$v[ad_code]}" title="{$v[title]}" style="{$v[style]}" border="0">
                </a>
               </adv>        
            </span> 
            <span>
              <adv  limit="1" item="v" pid="307">
                <a href="{$v.ad_link}" <if condition="$v['target'] eq 1">target="_blank"</if> >
                    <img src="{$v[ad_code]}" title="{$v[title]}" style="{$v[style]}" border="0">
                </a>
               </adv>        
            </span> 
            </dd> 
          </dl>
      <strong>
                <adv  limit="1" item="v" pid="308">
                <a href="{$v.ad_link}" <if condition="$v['target'] eq 1">target="_blank"</if> >
                    <img src="{$v[ad_code]}" title="{$v[title]}" style="{$v[style]}" border="0">
                </a>
               </adv>
        </strong>
    </div>  


<section class="index_floor">
  <div class="floor_body1">
    <h2><em></em>精品推荐
        <div class="geng"> <a href="{:U('Goods/search',array('qtype'=>'is_recommend'))}">更多</a> <span></span></div>
    </h2>
    <div id="scroll_best" class="scroll_hot">
      <div class="bd">
        <ul>
        <assign name="fl" value="1"/>
         <tpshop sql="select a.*,b.is_recommend from __PREFIX__group_buy as a left join __PREFIX__goods as b on a.goods_id=b.goods_id where b.is_recommend=1 and a.end_time gt '$end_time' order by b.sort limit 9" item="v" key="k">
          <li>
            <a href="{:U('Mobile/Goods/goodsInfo',array('id'=>$v[goods_id],'u_id'=>$user))}" title="{$v.goods_name}">
             <div class="index_pro"> 
	              <div class="products_kuang">
	                <img src="{$v.goods_id|goods_thum_images=400,400}"></div>
	              <div class="goods_name">{$v.goods_name}</div>
	              <div class="price">
	                 <a href="javascript:AjaxAddCart({$v[goods_id]},1,0);" class="btns">
	                    <img src="__STATIC__/images/index_flow.png">
	                 </a>
	                 <span href="{:U('Mobile/Goods/goodsInfo',array('id'=>$v[goods_id],'u_id'=>$user))}" class="price_pro">￥{$v.price}元</span>
	              </div>
              </div>
            </a>
            <span class="sg_g_time last_g_time jstimerBox{$v[id]}"></span>
            <script>
            ///
            Tday['{$v[id]}'] = new Date('{$v.end_time|date="Y/m/d H:i:s",###}');  
            window.setInterval(function()    
            {
              //alert(clock11('{$v[goods_id]}'))
              $('.jstimerBox{$v[id]}').html(clock11('{$v[id]}'));
              //document.getElementById('jstimerBox{$v[goods_id]}').innerHTML=clock11('{$v[goods_id]}');
            }, 1000);  
            </script> 
           </li>
           <if condition="($fl++%3 eq 0) && ($fl lt 9)"></ul><ul></if>
           </tpshop>
           </ul>
       </div>
       <div class="hd">
          <ul></ul>
       </div>
      </div>
    </div>
  </section>
  <script type="text/javascript">
    TouchSlide({ 
      slideCell:"#scroll_best",
      titCell:".hd ul", //开启自动分页 autoPage:true ，此时设置 titCell 为导航元素包裹层
      effect:"leftLoop", 
      autoPage:true, //自动分页
      //switchLoad:"_src" //切换加载，真实图片路径为"_src" 
    });
  </script>

<section class="index_floor">
  <div class="floor_body1" >
    <h2>
      <em></em>
      新品上市
        <div class="geng"><a href="{:U('Goods/search',array('qtype'=>'is_new'))}" >更多</a> <span></span></div>
    </h2>
    <div id="scroll_new" class="scroll_hot">
      <div class="bd">
        <ul>
        <assign name="fl" value="1"/>
         <tpshop sql="select a.*,b.is_recommend from __PREFIX__group_buy as a left join __PREFIX__goods as b on a.goods_id=b.goods_id where b.is_new=1 and a.end_time gt '$end_time' order by b.sort limit 9" item="v" key="k">
          <li>
            <a href="{:U('Mobile/Goods/goodsInfo',array('id'=>$v[goods_id],'u_id'=>$user))}" title="{$v.goods_name}">
             <div class="index_pro"> 
	              <div class="products_kuang">
	                <img src="{$v.goods_id|goods_thum_images=400,400}"></div>
	              <div class="goods_name">{$v.goods_name}</div>
	              <div class="price">
	                 <a href="javascript:AjaxAddCart({$v[goods_id]},1,0);" class="btns">
	                    <img src="__STATIC__/images/index_flow.png">
	                 </a>
	                 <span href="{:U('Mobile/Goods/goodsInfo',array('id'=>$v[goods_id],'u_id'=>$user))}" class="price_pro">￥{$v.price}元</span>
	              </div>
              </div>
            </a>
              <span class="sg_g_time last_g_time jstimerBox{$v[id]}"></span>
            <script>
            ///
            Tday['{$v[id]}'] = new Date('{$v.end_time|date="Y/m/d H:i:s",###}');  
            window.setInterval(function()    
            {
              //alert(clock11('{$v[goods_id]}'))
              $('.jstimerBox{$v[id]}').html(clock11('{$v[id]}'));
              //document.getElementById('jstimerBox{$v[goods_id]}').innerHTML=clock11('{$v[goods_id]}');
            }, 1000);  
            </script> 
           </li>
           <if condition="($fl++%3 eq 0) && ($fl lt 9)"></ul><ul></if>
           </tpshop></ul>
        </div>
        <div class="hd">
          <ul></ul>
        </div>
      </div>
    </div>
  </section>
  <script type="text/javascript">
    TouchSlide({ 
      slideCell:"#scroll_new",
      titCell:".hd ul", //开启自动分页 autoPage:true ，此时设置 titCell 为导航元素包裹层
      effect:"leftLoop", 
      autoPage:true, //自动分页
      //switchLoad:"_src" //切换加载，真实图片路径为"_src" 
    });
  </script>
<section class="index_floor">
  <div class="floor_body1" >
    <h2><em></em>热销商品
        <div class="geng"><a href="{:U('Goods/search',array('qtype'=>'is_hot'))}" >更多</a> <span></span></div>
    </h2>
    <div id="scroll_hot" class="scroll_hot">
      <div class="bd">
        <ul>
        <assign name="fl" value="1"/>
         <tpshop sql="select a.*,b.is_recommend from __PREFIX__group_buy as a left join __PREFIX__goods as b on a.goods_id=b.goods_id where b.is_hot=1 and a.end_time gt '$end_time' order by b.sort limit 9" item="v" key="k">
          <li>
            <a href="{:U('Mobile/Goods/goodsInfo',array('id'=>$v[goods_id],'u_id'=>$user))}" title="{$v.goods_name}">
             <div class="index_pro"> 
	              <div class="products_kuang">
	                <img src="{$v.goods_id|goods_thum_images=400,400}"></div>
	              <div class="goods_name">{$v.goods_name}</div>
	              <div class="price">
	                 <a href="javascript:AjaxAddCart({$v[goods_id]},1,0);" class="btns">
	                    <img src="__STATIC__/images/index_flow.png">
	                 </a>
	                 <span href="{:U('Mobile/Goods/goodsInfo',array('id'=>$v[goods_id],'u_id'=>$user))}" class="price_pro">￥{$v.price}元</span>
	              </div>
              </div>
            </a>
              <span class="sg_g_time last_g_time jstimerBox{$v[id]}"></span>
            <script>
            ///
            Tday['{$v[id]}'] = new Date('{$v.end_time|date="Y/m/d H:i:s",###}');  
            window.setInterval(function()    
            {
              //alert(clock11('{$v[goods_id]}'))
              $('.jstimerBox{$v[id]}').html(clock11('{$v[id]}'));
              //document.getElementById('jstimerBox{$v[goods_id]}').innerHTML=clock11('{$v[goods_id]}');
            }, 1000);  
            </script> 
           </li>
           <if condition="($fl++%3 eq 0) && ($fl lt 9)"></ul><ul></if>
           </tpshop></ul>
          </div>
        <div class="hd">
          <ul></ul>
        </div>
      </div>
    </div>
  </section>
  <script type="text/javascript">
    TouchSlide({ 
      slideCell:"#scroll_hot",
      titCell:".hd ul", //开启自动分页 autoPage:true ，此时设置 titCell 为导航元素包裹层
      effect:"leftLoop", 
      autoPage:true, //自动分页
      //switchLoad:"_src" //切换加载，真实图片路径为"_src" 
    });
  </script>
 
 
<section class="index_floor_lou">
    <div class="floor_body ">
        <h2>
            <em></em><div class="geng"><a href="javascript:void(0);" >更多</a> <span></span></div>
         </h2>
        <ul>
         </ul>
    </div>
</section> 
 
<div id="index_banner" class="index_banner">
	<div class="bd">
		<ul>
          <adv  limit="2" item="v" pid="309">
          <li>
            <a href="{$v.ad_link}" <if condition="$v['target'] eq 1">target="_blank"</if> >
                <img src="{$v[ad_code]}" title="{$v[title]}" style="{$v[style]}" border="0">
            </a>
            </li>
           </adv>        
	    </ul>
	</div>
	<div class="hd">
		<ul>         
        </ul>
	</div>
</div>
<script type="text/javascript">
	TouchSlide({ 
		slideCell:"#index_banner",
		titCell:".hd ul", //开启自动分页 autoPage:true ，此时设置 titCell 为导航元素包裹层
		mainCell:".bd ul", 
		effect:"leftLoop", 
		autoPage:true,//自动分页
		autoPlay:true //自动播放
	});
</script>
   
<script type="text/javascript">
var url = "index.php?m=Mobile&c=Index&a=ajaxGetMore";
$(function(){
	//$('#J_ItemList').more({'address': url});
	getGoodsList();
});

var page = 1;
function getGoodsList(){
	$('.get_more').show();
	$.ajax({
		type : "get",
		url:"/index.php?m=Mobile&c=Index&a=ajaxGetMore&p="+page,
		success: function(data)
		{
			if(data){
				$("#J_ItemList>ul").append(data);
				page++;
				$('.get_more').hide();
			}else{
				$('.get_more').hide();
				$('#getmore').remove();
			}
		}
	}); 
}
</script> 
<div class="floor_body2" >
  <h2>————&nbsp;猜你喜欢&nbsp;————</h2>
  <div id="J_ItemList">
    <ul class="product single_item info">
    </ul>
    <a href="javascript:;" class="get_more" style="text-align:center; display:block;"> 
    <img src='__STATIC__/images/category/loader.gif' width="12" height="12"> </a> 
  </div>
  <div id="getmore" style="font-size:.24rem;text-align: center;color:#888;padding:.25rem .24rem .4rem;">
  	<a href="javascript:void(0)" onClick="getGoodsList()">点击加载更多</a>
  </div>
</div>
<include file="public/footer"/>
<script>
function goTop(){
	$('html,body').animate({'scrollTop':0},600);
}
</script>
<a href="javascript:goTop();" class="gotop"><img src="__STATIC__/images/topup.png"></a> 
</div>
<div id="J_demo" style="display:none"></div>
 <div id="search_hide" class="search_hide">
 <h2> <span class="close"><img src="__STATIC__/images/close.png"></span>关键搜索</h2>
 <div id="mallSearch" class="search_mid">
        <div id="search_tips" style="display:none;"></div>
          <ul class="search-type">
          	<li  class="cur"  num="0">宝贝</li>
          	<!--<li  num="1">店铺</li>-->
          </ul>	
          <div class="searchdotm"> 
          <form class="set_ip"name="sourch_form" id="sourch_form" method="post" action="{:U('Goods/search')}">
              <div class="mallSearch-input">
                <div id="s-combobox-135">
                    <input class="s-combobox-input" name="q" id="q"  placeholder="请输入关键词"  type="text" value="<?php echo I('q'); ?>" />
                </div>                                                
                <input type="button" value="" class="button"  onclick="if($.trim($('#q').val()) != '') $('#sourch_form').submit();" />
              </div>
          </form>
         </div> 
        </div>
 		<!--
		<div class="search_body">
		<div class="search_box">
		<form action="search.php" method="post" id="searchForm" name="searchForm">
		<div>
		<select id='search_type' name="search_type" style="width:15%;">
			<option value='search'>宝贝</option>
			<option value='stores'>店铺</option>
		</select>
		     <input class="text" type="search" name="keywords" id="keywordBox" autofocus>
		     <button type="submit" value="搜 索" ></button>
		</div>
		</form>
	    </div>
		</div>
       -->              
    	<section class="mix_recently_search"><h3>热门搜索</h3>
	     <ul>
            <foreach name="tpshop_config.hot_keywords" item="wd" key="k">
               <li><a href="{:U('Goods/search',array('q'=>$wd))}" <if condition="$k eq 0">class="ht"</if>>{$wd}</a></li>
            </foreach>         
	      </ul>
        </section>
    </div>
                                             
</div>
<include file="public/footer_nav"/>
 
<script type="text/javascript">
$(function() {
    $('#search_text').click(function(){
        $(".showpage").children('div').hide();
        $("#search_hide").css('position','fixed').css('top','0px').css('width','100%').css('z-index','999').show();
    })
    $('#get_search_box').click(function(){
        $(".showpage").children('div').hide();
        $("#search_hide").css('position','fixed').css('top','0px').css('width','100%').css('z-index','999').show();
    })
    $("#search_hide .close").click(function(){
        $(".showpage").children('div').show();
        $("#search_hide").hide();
    })
});
</script>
<script>
$('.search-type li').click(function() {
    $(this).addClass('cur').siblings().removeClass('cur');
    $('#searchtype').val($(this).attr('num'));
});
$('#searchtype').val($(this).attr('0'));
</script>
<script src="__PUBLIC__/js/jqueryUrlGet.js"></script><!--获取get参数插件-->
<script> set_first_leader(); //设置推荐人 </script>
 
</body>
</html>